import {createRouter, createWebHashHistory} from 'vue-router';


const routes = [
    { path: '/', redirect: '/user/auth' },  // 重定向到 /user/home
    { path: '/user/auth', name: 'auth', component: () => import('@/apps/client/views/AuthPage.vue'), },

    { path: '/user/home', name: 'home', component: () => import('@/apps/client/views/HomePage.vue'), },
    { path: '/user/myUserInfo', name: 'myUserInfo', component: () => import('@/apps/client/views/MyUserPage.vue') },

    { path: '/user/instrumentSelect', name: 'instrumentSelect', component: () => import('@/apps/client/views/InstrumentSelectPage.vue') },
    { path: '/user/instrumentBorrow', name: 'instrumentBorrow', component: () => import('@/apps/client/views/InstrumentBorrowByListPage.vue') },
    { path: '/user/instrumentReservation', name: 'instrumentReservation', component: () => import('@/apps/client/views/InstrumentReservationPage.vue') },
    { path: '/user/instrumentBorrowReturn', name: 'instrumentBorrowReturn', component: () => import('@/apps/client/views/InstrumentBorrowReturnPage.vue') },
    { path: '/user/instrumentReturnRecord', name: 'instrumentReturnRecord', component: () => import('@/apps/client/views/InstrumentReturnRecordPage.vue') },
    { path: '/user/instrumentBorrowByList', name: 'instrumentBorrowByList', component: () => import('@/apps/client/views/instrumentBorrowByListPage.vue') },
    { path: '/user/instrumentBorrowByUp', name: 'instrumentBorrowByUp', component: () => import('@/apps/client/views/InstrumentBorrowByUpPage.vue') },

    { path: '/user/instrumentReturn', name: 'instrumentReturn', component: () => import('@/apps/client/views/InstrumentReturnPage.vue') },

    { path: '/user/reservationSelect', name: 'reservationSelect', component: () => import('@/apps/client/views/RoomSelectPage.vue') },
    { path: '/user/myReservation', name: 'myReservation', component: () => import('@/apps/client/views/MyReservationPage.vue') },
    { path: '/user/cubicleReservation', name: 'cubicleReservation', component: () => import('@/apps/client/views/CubicleReservationPage.vue') },

    { path: '/user/qrcodeScanner', name: 'qrcodeScanner', component: () => import('@/apps/client/views/QRCodeScanner.vue') },
    { path: '/user/register', name: 'register', component: () => import('@/apps/client/views/RegisterPage.vue') },
    { path: '/user/notice', name: 'notice', component: () => import('@/apps/client/views/Notice.vue') },


];


const router = createRouter({
    history: createWebHashHistory(),
    routes,
});

export default router;
